<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>

<head>
<link rel="stylesheet" type="text/css" href="/css/style_fx.css" />
    <title>发现-笔飞美术作品</title>
   <script type="text/javascript" src="/js/jquery-1.7.2.min.js"></script>
       <%@include file="../common/jspcommon.jsp"%>
       <%@include file="../common/css.jsp"%>
       <script type="text/javascript" src="/js/page/pager.js"></script>
</head>
<body>
<div id="box">
      <%@include file="../common/header.jsp" %>
    <div class="top_nav_list">
        <div class="top_nav_list_l">
            <span class="style4 fl">${artClass.name }</span>
        </div>
          <div class="top_nav_list_r">
				        <c:if test="${!empty profSoSession}">
		    						<span class="fl"> 
								      	  ${profName}
									      <c:if test="${!empty profSoSession.sizeName}">&nbsp;&nbsp;${profSoSession.sizeName}</c:if>
								     	  <c:if test="${!empty profSoSession.priceName}">&nbsp;&nbsp;${profSoSession.priceName}</c:if>
								     	  <c:if test="${!empty profSoSession.groundName}">&nbsp;&nbsp;${profSoSession.groundName}</c:if>
								     	  <c:if test="${!empty profSoSession.useName}">&nbsp;&nbsp;${profSoSession.useName}</c:if>
		     						 </span>
		     						 <span class="fl"><a href="#" onclick="deleteSave()">&nbsp;<img src="../images/c_prof.jpg" class="close" alt="" /></a></span> 
		    				<ul>
		    				</ul>
		    			</c:if>
    			         <c:if test="${empty profSoSession}">
					            <c:if test="${fn:length(profList)>0}">
							        <ul>
								        <c:forEach items="${profList}" var="children">
								            <li><a href="#" onclick="showProfs('${children.identifier}')">${children.name}</a></li>
								        </c:forEach>
							        </ul>
						        </c:if>
			      	    </c:if>  
		        </div>
    </div>
    
    <div class="top_nav2">
        <div class="sub_div" onclick="$('#top_nav2_1').slideDown();" onmouseout="$('#top_nav2_1').hide();"><h2>适用用途</h2>
            <div id="top_nav2_1" class="sub_div_1" onmouseover="$('#top_nav2_1').show();">
            <ul>
                 <c:forEach items="${useList }" var="use"><li><a href="#" onclick="soClassPicUse('${use.identifier}')">${use.name }</a></li></c:forEach>
            </ul>
            </div>
        </div>
        <div class="sub_div" onclick="$('#top_nav2_2').slideDown();" onmouseout="$('#top_nav2_2').hide();"><h2>适用环境</h2>
            <div id="top_nav2_2" class="sub_div_1" onmouseover="$('#top_nav2_2').show();">
            <ul>
                 <c:forEach items="${groundList }" var="ground"><li><a href="#" onclick="soClassPicGround('${ground.identifier}')">${ground.name }</a></li></c:forEach>
            </ul>
            </div>
        </div>
        <div class="sub_div" onclick="$('#top_nav2_3').slideDown();" onmouseout="$('#top_nav2_3').hide();"><h2>作者所在城市</h2>
            <div id="top_nav2_3" class="sub_div_2" onmouseover="$('#top_nav2_3').show();">
                <select name="show_data" tabindex="10" id="province" onchange="selectArtist()"></select>
            </div>
        </div>
        <div class="sub_div" onclick="$('#top_nav2_4').slideDown();" onmouseout="$('#top_nav2_4').hide();"><h2>作者毕业院校</h2>
            <div id="top_nav2_4" class="sub_div_4" onmouseover="$('#top_nav2_4').show();">
                <p><b>搜索学校</b></p>
                <p class="mt10"><%@include file="companyName.jsp"%></p>
            </div>
        </div>
        <div class="sub_div" onclick="$('#top_nav2_5').slideDown();" onmouseout="$('#top_nav2_5').hide();"><h2>价格</h2>
            <div id="top_nav2_5" class="sub_div_1" onmouseover="$('#top_nav2_5').show();">
            <ul>
                <c:forEach items="${priceList }" var="price">
                        	<li><a href="#" onclick="soClassPicPrice('${price.identifier}')">${price.name }</a></li>
                        </c:forEach>
            </ul>
            </div>
        </div>
        <div class="sub_div" onclick="$('#top_nav2_6').slideDown();" onmouseout="$('#top_nav2_6').hide();"><h2>尺寸</h2>
            <div id="top_nav2_6" class="sub_div_1" onmouseover="$('#top_nav2_6').show();">
            <ul>
                <c:forEach items="${sizeList }" var="size">
                        	<li><a href="#" onclick="soClassPicSize('${size.identifier}')">${size.name }</a></li>
                        </c:forEach>
            </ul>
            </div>
        </div>
    </div>
    
    <div id="main_div">
        <div class="main_div_list4">
        <ul>
        <c:forEach items="${modelFindPic.list }" var="list" varStatus="vs"> 
            <li class="item1">
                <a href="#"  onclick="fart('${list.identifier}')"><img src="${list.imagePath}" class="img_1" alt="" style="width: 214px;height: 165px;"/></a>
                <div class="c_1">
                    <p>${list.title}</p>
                    <p class="line">作者：${list.painter}</p>
                    <p>${list.artClassName }</p>
                </div>
                <div class="c_2">
                   <span class="icon_like">${list.loveAmount }</span>　<span class="icon_click">${list.viewAmount }</span>
                </div>
            </li>
         </c:forEach>
        </ul>
        </div>
        <script src="/js/jquery.masonry.min.js"></script>
        <script>
          $(function(){
            
            $('.main_div_list4').masonry({
              itemSelector: '.item1',
            });
          });
        </script>
        <div class="page_div" style="width:960px;">
            	<div id="page" class="h_page"></div>
            </div>
        </div>
     	 <%@include file="../common/footer.jsp" %>	
</div>
 <script type="text/javascript">
 initProvince('province', '','');
 $(function(){
		$("#page").pager({
			pagenumber : "${modelFindPic.currentPage}",
			pagecount : "${modelFindPic.totalPage}",
			buttonClickCallback : function(page) {
				location.href = "/profs.htm?page="+ page+"&prof=${profId}"+"&yprof=${yprof};
			}
		});
	});
 function showProfs(classId){
	 window.location.href="/profs.htm?prof="+classId+"&yprof=1";
 }
 function soClassPicUse(classId){
	 window.location.href="/profs.htm?use="+classId+"&prof=${profId}";
 }
function soClassPicSize(classId){
	window.location.href="/profs.htm?size="+classId+"&prof=${profId}";
 }
function soClassPicGround(classId){
	window.location.href="/profs.htm?ground="+classId+"&prof=${profId}";
}
function soClassPicPrice(classId){
	window.location.href="/profs.htm?price="+classId+"&prof=${profId}";
}
function selectArtist(){
	var provinceCode= $("#province").val();
	window.location.href="/fartist.htm?province="+provinceCode;
	
}
function deleteSave(){
	$.post("deleteSave.htm", {
	}, function(isJoin) {
			if(isJoin){
				 window.location.href="/profs.htm?prof=${profId}";
			}else{
				alert("失败了，很抱歉。");
			}
	});
}
 </script>
</body>
</html>
